# Import
moment = require('moment')
post_date_regex = new RegExp("([0-9]+-)*")

docpadConfig = {
  prompts: false
  templateData:
    moment: require 'moment'
    marked: require 'docpad-plugin-marked/node_modules/marked'
    site:
      url: 'http://markgroves.us'
      name: 'mark groves'
      author: 'Mark Groves'
      email: 'mgroves@outlook.com'
    fullsizepath: "/photographs/940/"
    largepath: "/photographs/748/"
    mediumpath: "/photographs/420/"
    smallpath: "/photographs/300/"
    thumbpath: "/photographs/186/"
  plugins:
    dateurls:
      cleanurl: true

  collections:
    posts: ->
      @getCollection('documents').findAllLive({relativeDirPath: 'posts'}, [date: -1])
    blogs: -> @getCollection('documents').findAllLive({layout: 'post'}, [date: -1])
    links: -> @getCollection('documents').findAllLive({layout: 'link'}, [date: -1])
    photographs: -> @getCollection('documents').findAllLive({layout: 'photograph'}, [date: -1])
    blogsandlinks: -> @getCollection('documents').findAllLive({$or: [{layout: 'post'}, {layout: 'link'}]}, [date: -1])
    pages: -> @getCollection('documents').findAllLive({layout: 'page'}, [date: -1])
}

module.exports = docpadConfig

